#pragma once

#include "DXAMLCommon.h"
#include "IPALReader.h"
#include <xmllite.h>

class CWinReader :
	public IPALReader
{
public:
	CWinReader(void);
	~CWinReader(void);

	virtual XUINT32 Release();
	virtual HRESULT SetInput( XUINT32 cBuffer, XUINT8 *pBuffer);
	virtual HRESULT Read( PALNodeType *pType);
	virtual HRESULT GetPrefix( XUINT32 *pcString, XCHAR * *ppString);
	virtual HRESULT GetNamespaceUri( XUINT32 *pcString, XCHAR * *ppString);
	virtual HRESULT GetLocalName( XUINT32 *pcString, XCHAR * *ppString);
	virtual HRESULT GetValue( XUINT32 *pcString, XCHAR * *ppString);
	virtual BOOL EmptyElement();
	virtual HRESULT FirstAttribute();
	virtual HRESULT NextAttribute();
	virtual HRESULT GetPosition( XUINT32 *pnLine, XUINT32 *pnColumn);

private:
	XUINT32 m_cRef;
	HINSTANCE m_hLibrary;
	IXmlReader *m_pReader;
	IStream *m_pStream;
};

